package com.thirdgroup.dao.impl;

import com.thirdgroup.dao.CompanyInfoDao;
import com.thirdgroup.dao.base.BaseDAO;
import com.thirdgroup.pojo.entity.CompanyInfo;

public class CompanyInfoDaoImpl extends BaseDAO<CompanyInfo> implements CompanyInfoDao {
    @Override
    public CompanyInfo select() {
        String sql="select * from company_info";
        return super.findOne(sql,null);
    }

    @Override
    public Integer updateAsset(Double num) {
        String sql="UPDATE company_info\n" +
                "SET companyAsset = ? + 200000;";
        Object[] params={num};
        return super.executeSQL(sql,params);
    }
}
